﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class OrderListMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.OrderList>
    {
        public OrderListMap()
        {
            // table
            //ToTable("CMS_OrderList");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.OrderId)
                
                .IsRequired();
            Property(t => t.GoodsId)
                
                .IsRequired();
            Property(t => t.SaleType)
                
                .IsRequired();
            Property(t => t.OriginalPrice)
                
                .HasPrecision(19, 4)
                .IsRequired();
            Property(t => t.Price)
                
                .HasPrecision(19, 4)
                .IsRequired();
            Property(t => t.Quantity)
                
                .IsRequired();
            Property(t => t.SubTotal)
                
                .HasPrecision(19, 4)
                .IsRequired();
            Property(t => t.PresentExp)
                
                .IsRequired();
            Property(t => t.Remark)
                
                .HasMaxLength(1000)
                .IsRequired();
            Property(t => t.CheckInDate)
                
                .IsRequired();

            // Relationships

            //InitializeMapping();
        }
    }
}

